import request from '../utils/request'

export function login(data: Object) {
  return request({
    url: `/wx/user/login/wxhtml`,
    method: 'post',
    data
  })
}
export function getUserInfo() {
  return request({
    url: `/auth/users/info`,
    method: 'post'
  })
}
export function mobileBind(data: Object) {
  return request({
    url: `/wx/mobile/binding`,
    method: 'post',
    data
  })
}
export function getSmsCode(mobile: string) {
  const data = {
    mobile,
    sms_type: 330377,
    imgcode: null,
    client_id: import.meta.env.VITE_APP_CLIENTID
  }
  return request({
    url: '/sms/code',
    method: 'post',
    data
  })
}
